<%@page import="com.shsh.safemanage.util.RequestUtil"%>
<%@page import="com.shsh.safemanage.util.Util"%>
<%@page import="com.shsh.safemanage.model.AccidentCasualty"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.shsh.safemanage.util.Constants"%>
<%
	List<AccidentCasualty> innerCasualtyList = (List<AccidentCasualty>)request.getSession().getAttribute(Constants.SESSION_ACCIDENT_CASUALTY);
if(innerCasualtyList == null){
	innerCasualtyList = new ArrayList<AccidentCasualty>();
}
request.getSession().setAttribute(Constants.SESSION_ACCIDENT_CASUALTY, innerCasualtyList);

AccidentCasualty newCasualty = new AccidentCasualty();
innerCasualtyList.add(newCasualty);

newCasualty.setName(Util.isoToUTF8(request.getParameter(Constants.REQUEST_PARAMETER_CASUALTY_NAME)));
newCasualty.setAge(RequestUtil.getParameter(request, Constants.REQUEST_PARAMETER_AGE, (Integer)null));
newCasualty.setCasualtyDetail(Util.isoToUTF8(request.getParameter(Constants.REQUEST_PARAMETER_CASUALTY_DETAIL)));
newCasualty.setGender(RequestUtil.getParameter(request, Constants.REQUEST_PARAMETER_GENDER, 1));
newCasualty.setSeriousLevel(Util.isoToUTF8(request.getParameter(Constants.REQUEST_PARAMETER_SERIOUS_LEVEL)));
newCasualty.setWorkAge(RequestUtil.getParameter(request, Constants.REQUEST_PARAMETER_WORK_AGE, (Integer)null));
newCasualty.setWorkType(Util.isoToUTF8(request.getParameter(Constants.REQUEST_PARAMETER_WORK_TYPE)));

Map<String, Object> map = new HashMap<String, Object>();
map.put(Constants.JSON_KEY_IS_SUCCESS, true);
%>
<%=Util.toJSONString(map)%>